package io.gitee.sfch.chunmi.conf.listener;

import com.mybatisflex.annotation.AbstractUpdateListener;
import io.gitee.sfch.chunmi.entity.MutableEntity;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * {@link MutableEntity} 更新时修改更新审计信息
 */
@Component
public class MutableEntityUpdateListener extends AbstractUpdateListener<MutableEntity> {

    @Resource
    private MutableEntityInsertListener insertListener;

    @Override
    public void doUpdate(MutableEntity entity) {
        insertListener.setUpdateInfo(entity);
    }
}
